import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("fa_cms_fields",{schema:"fastadmin" } )
@Index("model_id",["model_id",])
@Index("diyform_id",["diyform_id",])
export class fa_cms_fields {

    @PrimaryGeneratedColumn({
        type:"smallint", 
        name:"id"
        })
    id:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"model_id"
        })
    model_id:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"diyform_id"
        })
    diyform_id:number;
        

    @Column("char",{ 
        nullable:false,
        length:30,
        name:"name"
        })
    name:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:30,
        name:"type"
        })
    type:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:30,
        name:"title"
        })
    title:string;
        

    @Column("text",{ 
        nullable:true,
        name:"content"
        })
    content:string | null;
        

    @Column("varchar",{ 
        nullable:false,
        length:100,
        name:"defaultvalue"
        })
    defaultvalue:string;
        

    @Column("varchar",{ 
        nullable:true,
        length:100,
        name:"rule"
        })
    rule:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:30,
        default: () => "'0'",
        name:"msg"
        })
    msg:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:30,
        default: () => "'0'",
        name:"ok"
        })
    ok:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:30,
        name:"tip"
        })
    tip:string | null;
        

    @Column("tinyint",{ 
        nullable:true,
        width:1,
        name:"decimals"
        })
    decimals:boolean | null;
        

    @Column("mediumint",{ 
        nullable:true,
        name:"length"
        })
    length:number | null;
        

    @Column("smallint",{ 
        nullable:true,
        name:"minimum"
        })
    minimum:number | null;
        

    @Column("smallint",{ 
        nullable:false,
        default: () => "'0'",
        name:"maximum"
        })
    maximum:number;
        

    @Column("varchar",{ 
        nullable:false,
        name:"extend"
        })
    extend:string;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"weigh"
        })
    weigh:number;
        

    @Column("int",{ 
        nullable:true,
        name:"createtime"
        })
    createtime:number | null;
        

    @Column("int",{ 
        nullable:true,
        name:"updatetime"
        })
    updatetime:number | null;
        

    @Column("tinyint",{ 
        nullable:false,
        width:1,
        default: () => "'0'",
        name:"iscontribute"
        })
    iscontribute:boolean;
        

    @Column("tinyint",{ 
        nullable:false,
        width:1,
        default: () => "'0'",
        name:"isfilter"
        })
    isfilter:boolean;
        

    @Column("enum",{ 
        nullable:false,
        enum:["normal","hidden"],
        name:"status"
        })
    status:string;
        
}
